import Vue from 'vue'
import 'normalize.css/normalize.css' // A modern alternative to CSS resets

import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import locale from 'element-ui/lib/locale/lang/zh-CN' // lang i18n

import '@/styles/index.scss' // global css

import App from './App'
import store from './store'
import router from './router'
import request from '@/utils/request'


import '@/icons' // icon
import '@/permission' // permission control

import axios from 'axios'
import fa from 'element-ui/src/locale/lang/fa';
Vue.prototype.$http = axios

axios.defaults.baseURL = '/api'

import VueSimpleAlert from "vue-simple-alert";
Vue.use(VueSimpleAlert);

// var instance = axios.create({
//   baseURL: 'http://127.0.0.1:8181',
//   timeout:3000,
//   headers:{"Content-Type":"multipart/form-data"}
// });
//
// Vue.config.productionTip = false;
// VUe.prototype.instance = instance;


// set ElementUI lang to EN
Vue.use(ElementUI, { locale })


Vue.prototype.req = request

Vue.config.productionTip = false

new Vue({
  el: '#app',
  router,
  store,
  render: h => h(App)
})
